package com.water.service.staticservice;

import com.water.service.TeamService;

/**
 * @author wsj
 * @version 1.0
 * @description: TODO
 * @date 2022/1/9 12:48
 */
/*
基于继承类的代理类，和被代理类，一对一关系
* */
public class ProxyService extends TeamService {


    public void add(){
        try{
            System.out.println("===开始日志======");
            System.out.println("===开始事务======");
            super.add();//被代理对象执行核心业务
            System.out.println("=====提交事务=====");
        }catch (Exception e){
            System.out.println("======回滚事务====");
            System.out.println("======日志====");
        }
        System.out.println("======结束日志====");
    }

}
